package LookDown;

use Moose ();
use Moose::Exporter;

Moose::Exporter->setup_import_methods (
				       with_caller => [ 'has_ld' ],
				       also        => 'Moose',
				      );
use Data::Dumper;
sub has_ld {
     my ($caller, $name, $look_down) = @_;
     warn Dumper($caller, $name, $look_down);
     Class::MOP::class_of($caller)->add_attribute($name,
						  is => 'ro',
						  lazy => 1,
						  default => sub { warn `date` ; $_[0]->tree->look_down(@$look_down); }
						 );
}

1;
